//
// Created by jsjxsy on 2022/8/17.
//
#include <iostream>
using namespace std;
//可能抛出异常
void a() noexcept(false) {
  cout << "a" << endl;
}
//一定不会抛出异常 noexcept默认是true
void g() noexcept(true) {
  throw "g() exception";
}

int main() {
  void (*h)() =a;
  void (*f)() noexcept = g;
  //f = a;//错误
  h = g;


  return 0;
}
